
class User{
    String name;
    String passwd;
    static int count;
    User(){

    }
    User(String name,String passwd){
        this.name=name;
        this.passwd=passwd;
        count++;
    }
static void getCount(){
//        return count;
        System.out.println("当前访问人数为："+User.count);
    }
}
public class testUser {
    public static void main(String[] args) {
        User u1 = new User("s","s");
        u1.getCount();
        User u2 = new User("q","q");
        u2.getCount();
        User u3 = new User("a","a");
        u3.getCount();

    }
}
